// 审核查看页面
import { reportReviewContext } from './_context'
import useHooks from './hooks'
import TitleCard from './components/TitleCard'
import ReportReviewInfoTable from './components/ReportReviewInfoTable'
import RejectModal from './components/RejectModal'
import CheckTable from '../../components/CheckTable'
import styles from './index.module.less'
import PressureInjuryModal from '@/components/PressureInjuryModal'

export default () => {
  const hooksData = useHooks()

  return (
    <reportReviewContext.Provider value={hooksData}>
      <div className='layout-main-conent'>
        <TitleCard
          handleSwitchChange={hooksData.handleSwitchChange}
          switchChecked={hooksData.switchChecked}
          reviewInfo={hooksData.reviewInfo}
          createTime={hooksData.createTime}
          status={hooksData.status}
          handleAgree={hooksData.handleAgree}
          handleAgreeCancel={hooksData.handleAgreeCancel}
        />
        <ReportReviewInfoTable />
        <div className={styles['content-bottom']}>
          <div className={styles['bottom-title']}>事件内容</div>
          <CheckTable
            handlePreview={hooksData.handlePreview}
            list={hooksData.eventList}
            txt={'跌倒（坠床）相关信息收集表（3）'}
          />
        </div>
        <RejectModal />
        <PressureInjuryModal {...hooksData.IndicatorsModal} onlyLook={true} />
      </div>
    </reportReviewContext.Provider>
  )
}
